import { createRouter, createWebHistory } from 'vue-router'
import UserAuth from '../views/user/UserAuth.vue'
import chart from "@/views/market/chart.vue";
import AdminLogin from "@/views/admin/AdminLogin.vue";
import MainInterface from "@/views/market/MainInterface";
const routes = [
  {
    path: '/',
    redirect: '/user/auth'  // 添加重定向
  },
  {
    path: '/user/auth',
    name: 'UserAuth',
    component: UserAuth
  },
  {
    path: '/market',
    name:'chart',
    component:chart
  },
  {
    path: '/adminLogin',
    name: 'AdminLogin',
    component: AdminLogin
  },
  {
    path: '/center',
    name: 'MainInterface',
    component: MainInterface
  },

]

//创建路由器
const router = createRouter({
  history: createWebHistory(),
  routes: routes
})

export default router